<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="tiles" uri="http://jakarta.apache.org/struts/tags-tiles"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net/el"%>
<%@ taglib prefix="jsecurity" uri="http://www.jsecurity.org/tags"%>

<html>

<head>
	<link type="text/css" rel="stylesheet"
		href="<c:url value="/scripts/jsecurity.css"/>" />
    <link rel="icon" href="${pageContext.request.contextPath}/themes/default/<spring:message code="app.icon"/>"/>
</head>

<body onload="document.forms[0].elements[0].focus();">

<div id="contentBox" align="center">

<h1>Security Login</h1>

<form:form commandName="commDataLogin"
	action="${pageContext.request.contextPath}/basic/login" method="POST">
		<!-- 
		<span style="color: red;">
			<form:errors />
		</span>
		 -->
		<c:if test="${not empty commDataLogin.errMsg}">
			<div style="color: red; font-size: 11px; font-weight: bold;">
			<ul>
				<c:forEach items="${commDataLogin.errMsg}" var="errMsg"
					varStatus="errMsgSt">
					<li>${errMsg}
				</c:forEach>
			</ul>
			</div>
		</c:if>
	<div>
        Username: <form:input path="username" />
	<br />
	<br />
        Password: <form:password path="password" />
	<br />
	<br />
	<img src="${pageContext.request.contextPath}/basic/captcha-image">
	<br />
	<br />
	sec code: <form:input path="kaptchafield" />
	<br />
	<br />
	</div>

	<input type="submit" value="Login" />
</form:form></div>
</body>

</html>